find second smallest number in array without sorting